<template>
    <div>
        <div class="hotel-logo">
            <img src="../../assets/images/logo.png" height="90" width="175"/>
            <span><i class="el-icon-position"></i> :亲爱的小主,非常感谢您的认可和评价!</span>
        </div>
        <div class="pj-area">
            <span>满意度：</span>
            <div class="block">
                <el-rate v-model="value2" :colors="colors"></el-rate>
            </div>
            <div class="hidden-name">
                <el-switch v-model="value1" active-color="#056da1" active-text="匿名评价" ></el-switch>
            </div>
            <div class="text-area">

                <textarea type="text" placeholder="亲，可以从各方面分享感受哦~"></textarea>

                <el-upload action="#" list-type="picture-card" :auto-upload="false">
                    <i slot="default" class="el-icon-plus"></i>
                    <div slot="file" slot-scope="{file}">
                        <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
                        <span class="el-upload-list__item-actions">
                        <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
                            <i class="el-icon-zoom-in"></i>
                        </span>
                        <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleDownload(file)">
                            <i class="el-icon-download"></i>
                        </span>
                        <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
                            <i class="el-icon-delete"></i>
                        </span>
                    </span>
                    </div>
                </el-upload>
                <el-dialog :visible.sync="dialogVisible">
                    <img width="100%" :src="dialogImageUrl" alt="">
                </el-dialog>
            </div>
            <input type="submit" value="提交"/>

        </div>
    </div>
</template>

<script>
    export default {
        name: "writePj",
        data() {
            return {
                value1: null,
                value2: null,
                colors: ['#99A9BF', '#F7BA2A', '#FF9900'] , // 等同于 { 2: '#99A9BF', 4: { value: '#F7BA2A', excluded: true }, 5: '#FF9900' }
                dialogImageUrl: '',
                dialogVisible: false,
                disabled: false
            }
        },
        methods:{
            handleRemove(file) {
                console.log(file);
            },
            handlePictureCardPreview(file) {
                this.dialogImageUrl = file.url;
                this.dialogVisible = true;
            },
            handleDownload(file) {
                console.log(file);
            }
        }
    }
</script>

<style scoped>
    .hotel-logo{
        height: 100px;
        background: white;
        box-shadow:0 2px 12px 0 rgba(0, 0, 0, 0.1);
        text-align: left;
    }
    .hotel-logo img{
       margin-left: 200px;
    }
    .hotel-logo span{
        float: right;
        margin: 70px 20px 0 0;
        color: #0085d0;
        font-size: 20px;
    }
    .pj-area{
        width: 1000px;
        height: 500px;
        margin: 40px auto;
        text-align: left;
    }
    .pj-area:hover{
        border:3px solid #056da1;
    }
    .pj-area span{
        display: inline-block;
        margin: 30px 0 0 100px;
    }
    .hidden-name{
        float: right;
        margin: 35px 100px 0 0;
    }
    .pj-area textarea{
        width: 800px;
        height: 200px;
        padding: 10px;
        font-size: 14px;
        border: none;
        outline-color: white;
    }
    .block{
        display: inline-block;
    }
    .text-area{
        margin: 10px 0 0 100px;
    }
    input[type="submit"]{
        width: 100px;
        height: 35px;
        margin-left:450px;
        margin-top: 15px;
        border-radius: 5px;
        border: none;
        background: #056da1;
        color: white;
    }
</style>